Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: JManager Reference /
Chapter 1 - JManager Reference / JManager Constants and Data Types


Session Callbacks Structure

When you create an instantiation of the Java runtime environment using JMOpenSession, you must pass a data structure that supplies callback information for that instantiation. The session callbacks data structure is defined by the JMSessionCallbacks data type.

struct JMSessionCallbacks {
   UInt32            fVersion;      /* set to kJMVersion */
   JMConsoleProcPtr  fStandardOutput;/* standard output */
   JMConsoleProcPtr  fStandardError;/* standard error */
   JMConsoleReadProcPtr fStandardIn;/* standard input */
};
Field Description
fVersion
The version of JManager. You should set this field to kJMVersion.
fStandardOutput
A pointer to a function that handles text sent to the standard output. JManager sends all console output to this function. This callback has the following type definition:
               typedef void (*JMConsoleProcPtr) (
                  JMSessionRef session, const char* message, 
                  UInt32 messageLen);
For more information, see the description of the application-defined function MyStandardOutput (page 60).
fStandardError
A pointer to a function that handles standard error output. JManager sends any error messages to this function. This callback has the following type definition:
               typedef void (*JMConsoleProcPtr) (
                  JMSessionRef session, const char* message,
                  UInt32 messageLen);
For more information, see the description of the application-defined function MyStandardError (page 60).
fStandardIn
A pointer to a function that handles console input. JManager accepts input from this routine. This value can be a null pointer, which indicates default behavior (no console input). This callback has the following type definition:
               typedef SInt32 (*JMConsoleReadProcPtr) (
                  JMSessionRef session, char* buffer, 
                  SInt32 maxBufferLength);
For more information, see the description of the application-defined function MyStandardIn (page 61).

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help